package compiler.semantic.symbol;

import es.uned.lsi.compiler.semantic.ScopeIF;
import es.uned.lsi.compiler.semantic.symbol.SymbolBase;
import es.uned.lsi.compiler.semantic.type.TypeIF;

/**
 * Class for SymbolConstant.
 */

// TODO: Student work
//       Include properties to characterize constants

public class SymbolConstant
    extends SymbolBase
{
	private int cteEnt;
	private boolean cteBool;
	private int tipo = -1;			//0 si es entera
									//1 si es booleana
    
    /**
     * Constructor for SymbolConstant.
     * @param scope The declaration scope.
     * @param name The symbol name.
     * @param type The symbol type.
     */
    public SymbolConstant (ScopeIF scope,
                           String name,
                           TypeIF type,
                           boolean b)
    {
        super (scope, name, type);
        cteBool = b;
        tipo = 1;
    } 

    public SymbolConstant (ScopeIF scope,
            String name,
            TypeIF type,
            int n)
    {
    	super (scope, name, type);
    	cteEnt = n;
    	tipo = 0;
    }    
    
	public int getCteEnt() {
		return cteEnt;
	}
    
	public boolean getCteBool() {
		return cteBool;
	}

	public int getTipo() {
		return tipo;
	}
    
}
